<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.cetc39.util.DateJsonValueProcessor"%>
<%@ page import="net.sf.json.JsonConfig"%>
<%@ page import="net.sf.json.JSONObject"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>39 | 一级计划更动</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="Modern Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript">
	
	 addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } 

</script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/lines.css" rel='stylesheet' type='text/css' />
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!-- Sortable -->
<link href="css/jquery-ui.min.css" />
<script src="js/jquery-ui.min.js"></script>
<script src="js/sortable-cetc39.js"></script>
<!-- Nav CSS -->
<link href="css/custom.css" rel="stylesheet">
<!-- Metis Menu Plugin JavaScript -->
<script src="js/metisMenu.min.js"></script>
<script src="js/custom.js"></script>
<!-- Graph JavaScript -->
<script src="js/d3.v3.js"></script>
<script src="js/rickshaw.js"></script>
<style type="text/css">
.detail_test ul {
	list-style: none;
	margin-left: 0%
}

.detail_test li {
	float: left;
	margin-right: 9%
}

details summary::-webkit-details-marker {
	display: none;
}
</style>
<script type="text/javascript">
	$(function() {
		draggable();
	});

	function getNodeDetail(id) {
		var newWindow = null;
		if (newWindow == null || newWindow.closed) {
			openUrl = "nodeDetail?opcode=getNodeDetail&node_id=" + id;
			var width = 900;
			var height = 690;
			var left = parseInt((screen.availWidth / 2) - (width / 2));
			var top = parseInt((screen.availHeight / 2) - (height / 2));
			var windowFeatures = "width="
					+ width
					+ ",height="
					+ height
					+ ",status=no,resizable=0,scrollbars=0,titlebar=0,toolbar=0,location=no,menubar=0,left="
					+ left + ",top=" + top + "screenX=" + left + ",screenY="
					+ top;
			newWindow = window.open(openUrl, "node_update_subWind",
					windowFeatures);
		} else {
			newWindow.focus();
		}

	}

	function fun() {
		var id = $("#select1  option:selected").val();
		window.location.href = "findPlanById?opcode=forUpdate&id=" + id;
	}

	function menuQuery() {
		var firstplan_id = $("#firstplan_id").val();
		var newWindow = null;
		if (newWindow == null || newWindow.closed) {
			var openUrl = "node_null01.html?id=" + firstplan_id;//弹出窗口的urlz`
			var width = 800;
			var height = 690;
			var left = parseInt((screen.availWidth / 2) - (width / 2));
			var top = parseInt((screen.availHeight / 2) - (height / 2));
			var windowFeatures = "width="
					+ width
					+ ",height="
					+ height
					+ ",status=no,resizable=0,scrollbars=0,titlebar=0,toolbar=0,location=no,menubar=0,left="
					+ left + ",top=" + top + "screenX=" + left + ",screenY="
					+ top;
			newWindow = window
					.open(openUrl, "node_add_subWind", windowFeatures);
		} else {
			newWindow.focus();
		}
	}
</script>
</head>
<body>
	<div id="wrapper">
		<!-- Navigation -->
		<!-- left.jsp -->
		<jsp:include page="left.jsp"></jsp:include>
		<div id="page-wrapper">
			<div class="xs">
				<div class="well1 white">
					<h1 align="center">一级计划列表</h1>
				</div>
				<h3 align="center">计划信息</h3>
				<div id="firstplan">
					<table class="table">
						<tr>
							<th>项目令号</th>
							<td>${firstplan.project.project_code }</td>
							<th>项目名称</th>
							<td>${firstplan.project.project_name }</td>
							<th>计划编号</th>
							<td>${firstplan.plan_id }</td>
						</tr>
						<tr>
							<th>计划发布时间</th>
							<td>${fn:substring(firstplan.plan_issue, 0, 19) }</td>
							<th>计划最后编辑时间</th>
							<td>${fn:substring(firstplan.plan_lastedit, 0, 19) }</td>
							<th>计划开始创建时间</th>
							<td>${fn:substring(firstplan.plan_setstart, 0, 19) }</td>

							<!-- <th><span id="lasteditTh"></span></th>
							<td><span id="lastedit"></span></td>
							<th><span id="issueTH"></span></th>
							<td><span id="issue"></span></td -->
							>
						</tr>
						<tr>
							<th>计划版本</th>
							<td>V${firstplan.plan_version }</td>
						</tr>
					</table>
					<input type="hidden" value="${firstplan.project.project_name }"
						id="firstplan_project_name" /> <input type="hidden"
						value="${firstplan.id }" id="firstplan_id" />
				</div>
				<br>
				<h3 align="center">节点信息</h3>
				<br>
				<div id="detail_div" class="detail_test" align="center">
					<br>
					<table class="table" id="node_table">
						<thead>
							<tr>
								<th>节点编号</th>
								<th>责任部门</th>
								<th>节点状态</th>
								<th>节点描述</th>
								<th>节点开始时间</th>
								<th>节点结束时间</th>
								<th>节点版本</th>
								<th>操作</th>
							</tr>
						</thead>

						<tbody id="sortable">
							<c:forEach var="node" items="${nodeList }">
								<c:choose>
									<c:when test="${node.updateornot==0 }">
										<tr>
											<td>${node.node_id }</td>
											<td>${node.department.dept_name }</td>
											<td><c:choose>
													<c:when test="${node.status==0 }">
														<span style="color:blue;">待检查</span>
													</c:when>
													<c:when test="${node.status==1 }">
														<span style="color:black;">已完成</span>
													</c:when>
													<c:when test="${node.status==2 }">
														<span style="color:red;">未完成</span>
													</c:when>
													<c:when test="${node.status==3 }">
														<span style="color:red;">待审批</span>
													</c:when>
												</c:choose>
											</td>

											<td>${node.node_describe }</td>
											<td>${fn:substring(node.node_starttime, 0, 10)}</td>
											<td>${fn:substring(node.node_endtime, 0, 10) }</td>
											<td>${node.node_version }</td>

											<td><button onclick="getNodeDetail(this.value)"
													value="${node.id }">修改信息</button>
											</td>
										</tr>
									</c:when>
								</c:choose>
							</c:forEach>
						</tbody>
					</table>
				</div>
				<div class="form-group" align="center">
					<button class="btn btn-primary" onclick="menuQuery()">添加节点</button>
					<button class="btn btn-primary" onclick="history.go(-1);">返
						回</button>
				</div>
			</div>

		</div>
		<!-- copyright -->
		<div id="footer">
			<jsp:include page="copyright.jsp"></jsp:include>
		</div>
	</div>
	<!-- /#page-wrapper -->
	<!-- /#wrapper -->
	<!-- Bootstrap Core JavaScript -->
	<script src="js/bootstrap.min.js"></script>
</body>
</html>
